import request from '@/config/axios'

export interface ListVO {
  id: number
  name: string
  numberCount: number
  ownerUserId: number
}

// 查询呼叫名单分页
export const getListPage = async (params) => {
  return await request.get({ url: `/call/list/page`, params })
}

// 查询呼叫名单详情
export const getList = async (id: number) => {
  return await request.get({ url: `/call/list/get?id=` + id })
}

// 新增呼叫名单
export const createList = async (data: ListVO) => {
  return await request.post({ url: `/call/list/create`, data })
}

// 修改呼叫名单
export const updateList = async (data: ListVO) => {
  return await request.put({ url: `/call/list/update`, data })
}

// 删除呼叫名单
export const deleteList = async (id: number) => {
  return await request.delete({ url: `/call/list/delete?id=` + id })
}

// 导出呼叫名单 Excel
export const exportList = async (params) => {
  return await request.download({ url: `/call/list/export-excel`, params })
}